<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css动画</title>
    <script src="https://cdn.bootcss.com/vue/2.4.2/vue.js"></script>

    <style>
        .bounce-enter-active {
            animation: bounce-in .5s;
        }
        .bounce-leave-active {
            animation: bounce-out .5s;
        }
        @keyframes bounce-in {
            0% {
                transform: scale(0);
            }
            50% {
                transform: scale(1.5);
            }
            100% {
                transform: scale(1);
            }
        }
        @keyframes bounce-out {
            0% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.5);
            }
            100% {
                transform: scale(0);
            }
        }
    </style>
</head>
<body>
    <div id="app">
        <button @click="show = !show">Toggle show</button>
        <transition name="bounce">
            <p v-if="show">Look at me!</p>
        </transition>
    </div>

    <script>
        var vm = new Vue({
            el : '#app',
            data : {
                show : true
            }
        });
    </script>
</body>
</html>